/**
 * 除了 登录和首页以外 所有页面的路由配置 , 也就是菜单导航的所有路由配置
 * **/ 
const Product = () => import('@/views/product/index.vue')
const List = () => import('@/views/product/list/index.vue')
const ProductPage = () => import('@/views/product/list/productpage.vue')
const Category = () => import('@/views/product/category/index.vue')
const Order = () => import('@/views/order/index.vue')
const OrderList = () => import('@/views/order/list/index.vue')
const OrderListDetaile = () => import('@/views/order/list/detaile.vue')
const OrderCollect = () => import('@/views/order/collect/index.vue')
const OrderContract = () => import('@/views/order/contract/index.vue')
const Advert = () => import('@/views/advert/index.vue')
const AdvertList = () => import('@/views/advert/list/index.vue')
const System = () => import('@/views/system/index.vue')
const SystemCategary = () => import('@/views/system/categary/index.vue')
const SystemRoles = () => import('@/views/system/roles/index.vue')

export const menuRoutes = [
    {
        path: '/product',
        name: 'product',
        component: Product,
        meta: {
            title: '产品管理'
        },
        redirect: '/product/list',
        children: [
            {
                path: 'list',   // 不能在前面加 '/' 因为加上 就表示由根路径过来这个页面，会跳过 '/product'。 页面上做跳转时写全路径 /product/list
                name: 'list',
                component: List,
                meta: {
                    title: '产品列表',
                    fullPath:'/product/list'
                },
            },
            {
                path: 'category',
                name: 'category',
                component: Category,
                meta: {
                    title: '产品分类',
                    fullPath:'/product/category'
                },
            },
            {
                path: 'list/product-page', // 添加、编辑、详情 都使用该组件页面
                name: 'ProductPage',
                component: ProductPage,
                meta: {
                    activeMenu: '/product/list',
                    title: '产品处理',
                    isInter: true
                }
            }
        ]
    },
    {
        path: '/order',
        name: 'order',
        component: Order,
        meta: {
            title: '订单管理'
        },
        redirect: '/order/order-list',
        children: [
            {
                path: 'order-list',
                name: 'order-list',
                component: OrderList,
                meta: {
                    title: '订单列表',
                    fullPath:'/order/order-list'
                },
            },
            {
                path: 'order-list/detaile',
                name: 'order-list-detaile',
                component: OrderListDetaile,
                meta: {
                    title: '订单详情',
                    fullPath:'/order/order-list/detaile',
                    isInter: true
                },
            },
            {
                path: 'order-contract',
                name: 'order-contract',
                component: OrderContract,
                meta: {
                    title: '订单合同',
                    fullPath:'/order/order-contract'
                }
            },
            {
                path: 'order-collect',
                name: 'order-collect',
                component: OrderCollect,
                meta: {
                    title: '订单汇总',
                    fullPath:'/order/order-collect'
                },
            }
        ]
    },
    {
        path: '/advert',
        name: 'advert',
        component: Advert,
        meta: {
            title: '广告管理'
        },
        redirect: '/advert/advert-list',
        children: [
            {
                path: 'advert-list',
                name: 'advert-list',
                component: AdvertList,
                meta: {
                    title: '广告列表',
                    fullPath:'/advert/advert-list'
                },
            }
        ]
    },
    {
        path: '/system',
        name: 'system',
        component: System,
        meta: {
            title: '系统管理'
        },
        redirect: '/system/system-categary',
        children: [
            {
                path: 'system-categary',
                name: 'system-categary',
                component: SystemCategary,
                meta: {
                    title: '系统分类',
                    fullPath:'/system/system-categary'
                },
            },
            {
                path: 'system-roles',
                name: 'system-roles',
                component: SystemRoles,
                meta: {
                    title: '角色管理',
                    fullPath:'/system/system-roles'
                },
            }
        ]
    }
]